#include "Puzzle.h"

Puzzle::Puzzle(u8 num_entries) :
num_entries(num_entries)
{
	entries = new Puzzle_Entry*[num_entries];
}

Puzzle::~Puzzle() {
	for (int i=0 ; i < num_entries ; i++) {
		delete entries[i];
	}
	delete [] entries;
}

bool Puzzle::add_entry(Puzzle_Entry * entry) {
	if (current_index == num_entries) {
		return false;
	}

	entries[current_index++] = entry;
	return true;
}